try {

    // Object to hold information about the current page
    var pageInfo = {
        "selectedText": window.getSelection().toString()
    };
    
    // Send the information back to the extension
    chrome.extension.sendRequest(pageInfo);
} 
catch (e) {
    // do nothing
}
